<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of imrectLite</title>
  <meta name="keywords" content="imrectLite">
  <meta name="description" content="A 'lite' version of imrect [OBSOLETE: use imrectRot].">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html images -->
<h1>imrectLite
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>A 'lite' version of imrect [OBSOLETE: use imrectRot].</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [hRect,api] = imrectLite( hParent, pos, lims, ar, varargin ) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> A 'lite' version of imrect [OBSOLETE: use imrectRot].

 There are significant problems using imrect in a larger GUI, mostly
 due to the fact that imrect is such a heavy object.  This creates a
 simple, fast, and in some ways nicer version of imrect.

 The implementation uses two graphics object: a rectangle and a patch.
 The patch is just there to catch mouse clicks in case the rectangle does
 not have a face color.  Any valid property of the rectangle may be
 altered (such as 'FaceColor', 'Curvature', ... ), EXCEPT for its
 'ButtonDownFcn', 'DeleteFcn' and 'Position' properties.  To change the
 'Position' of the rectangle, use the output structure 'api' (described
 below).

 USAGE
  [hRect,api] = imrectLite( [hParent],[pos],[lims],[ar],[varargin] )

 INPUTS
  hParent    - [gca] object parent, typically an axes object (gca)
  pos        - [] initial pos vector [x y w h] or [] or [x0 y0]
  lims       - [] 2x2 matrix of [xMin xMax; yMin yMax]
  ar         - [0] aspect ratio (if positive w/h is constrained to ar)
  varargin   - [] parameters to RECTANGLE graphics object

 OUTPUTS
  hRect      - handle to rectangle, use to alter color etc.
  api        - interface allowing access to created object
  .getPos()       - get position - returns 4 elt pos
  .setPos(pos)    - set position (while respecting constraints)
  .setAr(ar)      - set aspect ratio to fixed value
  .setPosLock(b)  - if lock set (b==true), rectangle cannot change
  .setSizLock(b)  - if lock set (b==true), rectangle cannot change size
  .setPosChnCb(f) - whenever pos changes (even slightly), calls f(pos)
  .setPosSetCb(f) - whenever pos finished changing, calls f(pos)
  .uistack(...)   - calls 'uistack( [hRect hPatch], ... )', see uistack

 EXAMPLE
  figure(1), imshow cameraman.tif
  rectProp = {'EdgeColor','g','LineWidth',4,'Curvature',[.1 .1]};
  lims = [get(gca,'xLim'); get(gca,'yLim')];
  [h,api] = imrectLite( gca, [], lims, [],  rectProp{:} );
  api.setPosChnCb( @(pos) disp(['        ' num2str(pos)]) );
  api.setPosSetCb( @(pos) disp(['FINAL = ' num2str(pos)]) );

 See also IMRECT, RECTANGLE, PATCH

 Piotr's Image&amp;Video Toolbox      Version 2.35
 Copyright 2009 Piotr Dollar.  [pdollar-at-caltech.edu]
 Please email me if you find bugs, or have suggestions or questions!
 Licensed under the Lesser GPL [see external/lgpl.txt]</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
<!-- crossreference -->




<!-- Start of Google Analytics Code -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4884268-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- end of Google Analytics Code -->

<hr><address>Generated by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>
